package com.xja.dao;

import com.xja.entity.Comment;
import com.xja.entity.Register;
import com.xja.entity.Room;
import com.xja.entity.pojo.RoomAndBills;
import com.xja.entity.pojo.RoomAndIndent;

import java.sql.SQLException;
import java.util.List;

public interface LwlDao {
    //根据价格查询
    List<Room> findRoomByPrice(int price) throws SQLException;

    List<Room> findRoom() throws SQLException;

    //退房，需要先查询房间状态是0的状态，将房间号展示给前端
    List<Room> findRoomByName(String userName) throws SQLException;

    //退房
    Integer checkOutById(int roomId) throws SQLException;
    
    //用户评价
    //根据用户姓名查询用户id
    Integer findUserIdByName(String userName) throws SQLException;
    //查询账单表，账单表和房间表两表联查
    List<RoomAndBills> findBillsById(int userId) throws SQLException;
    //评价反馈，只有在账单信息表中查询到该用户的信息，才可以允许用户评价
    Integer estimate(Comment comment) throws SQLException;

    //入住
    List<RoomAndIndent> fidIndent(String findUserName)throws SQLException;
    //将订单表的信息转移到登记表
    Integer register(Register register)throws SQLException;
}
